import React, { Component } from 'react';
import Header from './common/header/index';
import { Provider } from 'react-redux';
import { BrowserRouter, Route} from 'react-router-dom';
import Home from './page/Home/Home';
import Detail from './page/Detail/Detail';
import Write from './page/Write/Write';
import login from './page/Login/Login';
import store from './store/index';
class App extends Component {
  render() {
    return (
      <Provider store = {store}>
            <BrowserRouter>
                <div>
                  <Header/>
                  <Route path='/' exact component = {Home} ></Route>
                  <Route path='/Detail/:id' exact component = {Detail} ></Route>
                  <Route path='/Write' exact component = {Write} ></Route>
                  <Route path='/login' exact component = {login} ></Route>
                </div>
            </BrowserRouter>
       </Provider>
    );
  }
}

export default App;
